package de.uni.muenster.idw2.location.bluetooth.service.transformations;

public class CWPoint{
	    private double latDec;
      private double lonDec;

    //  private MGRSPoint utm = new MGRSPoint();
      private boolean utmValid = false;

      public static final int DD = 0;
      public static final int DMM = 1;
      public static final int DMS = 2;
      public static final int UTM = 3;
      public static final int GK = 4;
      public static final int CW = 5;
      private static final int LAT_LON = 7;
      private static final int LON_LAT = 8;

      /**
       * Create CWPoint by using lat and lon
       * 
       * @param lat
       *            Latitude as decimal
       * @param lon
       *            Longitude as decimal
       */
      public CWPoint(double lat, double lon) {
              latDec = lat;
              lonDec = lon;
              this.utmValid = false;
      }

      /**
       * Creates an empty CWPoint, use set methods for filling
       */

      public CWPoint() {
              this(-361, -361); // construct with unvalid == unset lat/lon
              this.utmValid = false;

      }

      /**
       * Create CWPoint by using a CWPoint
       * 
       * @param CWPoint
       *            LatLonPoint
       */

      public CWPoint(CWPoint cwPoint) {
              this(cwPoint.getLatDec(), cwPoint.getLonDec());
              this.utmValid = false;
      }

      public double getLatDec() {
              return latDec;
      }

      public double getLonDec() {
              return lonDec;
      }
      
      /**
       * Returns true if the coordinates are valid
       */
      public boolean isValid() {
              return latDec <= 90.0 && latDec >= -90.0 && lonDec <= 360
                              && lonDec >= -360;
      }
}
